package com.wnhz.work.jy.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.wnhz.work.jy.BaseActivity;
import com.wnhz.work.jy.R;

import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

/**
 * 积分兑换
 */
public class CreditsExchange extends BaseActivity implements View.OnClickListener {
    @ViewInject(R.id.include_occupied)
    private View include_occupied;
    @ViewInject(R.id.blank_img)
    private ImageView blank_img;
    @ViewInject(R.id.blank_tv)
    private TextView blank_tv;
    private TextView title;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_credits_exchange);
        x.view().inject(this);

        title = (TextView) findViewById(R.id.view_main_middle_title);
        title.setText("兑换记录");
        findViewById(R.id.btn_main_left).setOnClickListener(this);
        setBlank();
    }

    private void setBlank() {
        if (true) {
            blank_tv.setText("还没兑换过东西~");
            blank_img.setImageResource(R.mipmap.ic_duihuanjilu);
            include_occupied.setVisibility(View.VISIBLE);
        } else {
            include_occupied.setVisibility(View.GONE);
        }
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn_main_left:
                finish();
                break;
        }
    }
}
